#-------------------------------------------------
#
# Project created by QtCreator 2020-11-30T11:11:52
#
#-------------------------------------------------

QT       += core gui

#greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
greaterThan(QT_MAJOR_VERSION, 4): {
QT += widgets
QMAKE_CFLAGS_ISYSTEM = -I
}

TARGET = demo1_ffmpeg
TEMPLATE = app
CONFIG +=console
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

CONFIG += c++11

SOURCES += \
        ffmpegmananger.cpp \
        main.cpp \
        mainwindow.cpp \
        playvideo.cpp

HEADERS += \
        ffmpegmananger.h \
        mainwindow.h \
        playvideo.h

FORMS += \
        mainwindow.ui



DEFINES += RUN_ON_EMBEDDEDSYSTEM_ARM
#DEFINES += RUN_ON_EMBEDDEDSYSTEM_ARM32

INCLUDEPATH += /usr/local/ffmpeg/include \
               /usr/local/x264/include

if(contains(DEFINES,RUN_ON_EMBEDDEDSYSTEM_ARM)){

if(contains(DEFINES,RUN_ON_EMBEDDEDSYSTEM_ARM32)){
# arm32
LIBS += /home/lcrtu/jijian/lib/libx264.so \
        /home/lcrtu/jijian/lib/libavcodec.so \
        /home/lcrtu/jijian/lib/libavdevice.so \
        /home/lcrtu/jijian/lib/libavfilter.so \
        /home/lcrtu/jijian/lib/libavutil.so \
        /home/lcrtu/jijian/lib/libavformat.so \
        /home/lcrtu/jijian/lib/libswresample.so \
        /home/lcrtu/jijian/lib/libswscale.so \
        /home/lcrtu/jijian/lib/libpostproc.so
}else{
#arm64
LIBS += /home/lcrtu/jijian/archive/x264/_install/lib/libx264.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libavcodec.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libavdevice.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libavfilter.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libavutil.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libavformat.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libswresample.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libswscale.so \
        /home/lcrtu/jijian/archive/ffmpeg-4.3.2/_install/lib/libpostproc.so \
        /home/lcrtu/jijian/archive/sqlite-autoconf-3370000/_install/lib/libsqlite3.so
}

}else{
# x86
LIBS += /usr/local/x264/lib/libx264.so \
        /usr/local/ffmpeg/lib/libavcodec.so \
        /usr/local/ffmpeg/lib/libavdevice.so \
        /usr/local/ffmpeg/lib/libavfilter.so \
        /usr/local/ffmpeg/lib/libavutil.so \
        /usr/local/ffmpeg/lib/libavformat.so \
        /usr/local/ffmpeg/lib/libswresample.so \
        /usr/local/ffmpeg/lib/libswscale.so \
        /usr/local/ffmpeg/lib/libpostproc.so \
        /usr/local/sqlite/lib/libsqlite3.so
}



#INCLUDEPATH += $$PWD/../../ffmpeg/include
#LIBS += $$PWD/../../ffmpeg/lib/avcodec.lib\
#        $$PWD/../../ffmpeg/lib/avdevice.lib\
#        $$PWD/../../ffmpeg/lib/avfilter.lib\
#        $$PWD/../../ffmpeg/lib/avformat.lib\
#        $$PWD/../../ffmpeg/lib/avutil.lib\
#        $$PWD/../../ffmpeg/lib/postproc.lib\
#        $$PWD/../../ffmpeg/lib/swresample.lib\
#        $$PWD/../../ffmpeg/lib/swscale.lib
####################链接动态库
## -L表示路径  -l（小写的L）表示动态库名
#LIBS += -L$$PWD/../../ffmpeg/bin -lavcodec-58 -lavdevice-58 -lavformat-58 -lpostproc-55 -lswresample-3 -lswscale-5
#/home/lcrtu/rtsp_test1.ts
#rtsp://admin:dct123456@192.168.1.178:554/Streaming/Channels/201
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
